package com.admin.education.models;

import com.admin.education.models.Enum.SponsorStatus;
import com.admin.education.repositories.Identifiable;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "sponsor")
@EntityListeners(AuditingEntityListener.class)
@Data
public class Sponsor implements Serializable,Identifiable{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @Column(name = "activity_project")
    @NotBlank
    @Length(max = 64)
    private String activityProject;
    @Column(name="sponsorship_intention")
    @Length(max = 64)
    @NotBlank
    private String sposorshipIntention;
    @Column(name="phone")
    @Length(max=20)
    @NotBlank
    private String phone;
    @Column(name="create_date")
    private Date createDate;
    @Column(name="creater")
    private int creater;
    @Column(name="status")
    private SponsorStatus status;

}
